//
//  CircleListViewController.m
//  GLGW_Shoping
//
//  Created by yang on 2018/11/21.
//  Copyright © 2018年 yang. All rights reserved.
//

#import "CircleListViewController.h"
#import "CircleListViewModel.h"
#import "CirclrMineViewController.h"
#import "ReleaseDynamicViewController.h"

@interface CircleListViewController ()

@property (nonatomic, strong) CircleListViewModel *listrViewModel;

@end

@implementation CircleListViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.listrViewModel = [[CircleListViewModel alloc] initWithViewToViewModel:self.groupedTableView theSuperView:self.view];
    kWeakSelf(self);
    self.listrViewModel.Block_more = ^(GLGWButton * _Nullable btn) {
        [weakself moreNewsVC];
    };
    self.listrViewModel.Block_Release = ^(GLGWButton * _Nullable btn) {
        [weakself releaseBtn];
    };
    [self addNavigationItemWithImageNames:@[@"goods_share"] isLeft:NO target:self action:@selector(rightAction:) tags:@[@200]];
}

- (void)releaseBtn
{
    ReleaseDynamicViewController *vc = [ReleaseDynamicViewController new];
    [self.navigationController pushViewController:vc animated:YES];
}

- (void)rightAction:(UIButton *)sender
{
    CirclrMineViewController *vc = [[CirclrMineViewController alloc] init];
    [self.navigationController pushViewController:vc animated:YES];
}

- (void)moreNewsVC
{
    DLog(@"加载更多新闻");
}

@end
